package com.example.demo.service

import com.example.demo.dto.*
import com.example.demo.vo.*
import com.example.demo.vo.ret.PatientInfo
import com.example.demo.vo.ret.webret.UserInfo
import com.example.demo.vo.webvo.MenuVo
import com.example.demo.vo.webvo.UserVo
import org.springframework.web.multipart.MultipartFile


interface WebService {

    /**
     * 菜单表
     */
    fun getMenuInfo(): List<MenuVo>?

    /**
     * 用户表
     */
    fun getUserInfo(username: String): UserVo?
    fun getUserInfo(id: Int): UserVo?

    //    fun doGetUserAuthorizationInfo(user: UserVo): UserVo?
    fun getUpdateAvatar(image: String, userId: String): UserInfo?
    fun getUpdatePassword(userId: String, newPassword: String): Int?
    fun getUserPassword(userId: String): String?
    fun getUpdateUserInfo(userDo: UserDo): UserInfo?

    /**
     * 病人表
     */
    fun getPatientInfoList(patientInfoListDo: PatientInfoListDo): PatientInfo?
    fun getPatientInfo(patientId: Int): InfoVo?

    /**
     * 科室表
     */
    fun getDeptTree(): List<DeptVo>?
    fun getDeptIdsByUserId(userId: String?): String

    /**
     * 标签表
     */
//    fun getNursingclassList(): List<NursingclassVo>?
    fun addNursingclass(nursingClassDo: NursingClassDo): Int?
    fun deleteNursingclassList(nursingClassDo: NursingClassDo): Int?

    /**
     * 调查表
     */

    fun deleteQuestionnaire(id: Int): Int?
    fun addQuestionnaire(addQuestionnaireDo: AddQuestionnaireDo): Int?
    fun updateQuestionnaire(addQuestionnaireDo: AddQuestionnaireDo): Int?
    fun getListQuestionnaire(): List<QuestionnaireVo>?
    fun getDetailQuestionnaire(id: Int): QuestionnaireInfoVo?
    fun getDetailQuestionnaireList(deptId: Int):List<QuestionnaireInfoVo>?
    fun psotDetailQuestionnaireList(questionnaireDo: List<QuestionnaireDo>):Int?

    /**
     * 护士表
     */
//    fun getNurseList(): List<NurseVo>?

    /**
     * apk表
     */
    fun addApk(file: MultipartFile, apkName: String, apkCode: String, apkType: String): ApkVo?
    fun getListApk(): List<ApkVo>?
    fun deleteApk(id: Int): Int?

    /**
     *  菜品类型表
     */
    fun getListFoodType(): List<FoodTypeVo>?
    fun addFoodType(title: String): Int?
    fun deleteFoodType(id: Int): Int?

    /**
     *  菜品表
     */
    fun addFood(
        title: String,
        price: Int,
        Introduction: String,
        specification: String,
        foodTypeId: Int,
        file: MultipartFile
    ): Int?

    fun getFoodList(): List<FoodInfoVo>?
    fun getFoodListByFoodTypeId(foodTypeId: Int): List<FoodInfoVo>?
    fun deleteFood(id: Int): Int?
    fun getFoodInfo(id: Int): FoodInfoVo?
    fun updateFood(
        id: Int,
        title: String,
        price: Int,
        Introduction: String,
        specification: String,
        foodTypeId: Int,
        foodTypeTitle: String
    ): Int?


    /**
     * 商品类型表
     */
    fun addProductType(title: String): Int?
    fun getProductTypeList(): List<ProductTypeVo>?
    fun deleteProductType(id: Int): Int?

    /**
     * 商品表
     */
    fun addProduct(
        title: String,
        price: Int,
        Introduction: String,
        specification: String,
        productTypeId: Int,
        file: MultipartFile
    ): Int?

    fun getProductInfoList(): List<ProductInfoVo>?
    fun getProductInfoListById(productTypeId:Int): List<ProductInfoVo>?

    /**
     * 设备表
     */
    fun getDeviceList(): List<DeviceVo>?
    fun getDevice(id: Int): DeviceVo?

    /**
     * 宣教视频表
     */
    fun addDeptVideo(
        deptid: Int,
        deptName: String,
        videoTitle: String,
        videoImageUrl: String,
        videoUrl: String
    ): Int?

    fun getDeptVideoList(deptid: Int?): List<DeptVideoVo>?
    fun deleteDeptVideo(id:Int): Int?

}